import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router';
// @ 是一个 src目录的别名
import Layout from '@/components/Layout.vue';
import fameIn from './fameIn';
import frameOut from './frameOut';

const routes: Array<RouteRecordRaw> = [
  {
    path: '/',
    component: Layout,
    redirect: '/index', // 重定向
    children: [
      ...fameIn,
    ],
  },
  ...frameOut,
];

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes,
});

export default router;
